package com.sskj.app;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;

import com.sskj.boom.bean.EscapeBean;
import com.sskj.boom.widget.BoomView;

import java.util.List;

public class MainActivity extends AppCompatActivity {

    private BoomView boomView;
    private List<EscapeBean> escapeBeans;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        boomView = findViewById(R.id.boomView);

    }

    public void start(View view) {
        boomView.gameStart();
    }

    public void stop(View view) {
        boomView.gameOver(2.3f);
    }

    public void prepare(View view) {
        boomView.gamePreparing(4000);
    }

    public void pause(View view) {
        boomView.gamePause();
    }

    public void time(View view) {
        EditText etNum = findViewById(R.id.etNum);
        boomView.supendStart(Long.valueOf(etNum.getText().toString()).intValue());

    }
}
